<!DOCTYPE html>
<!--conf
<sample>
              <product version="4.0b1" edition="std"/>
                     <modifications>
                            <modified date="130911"/>
                     </modifications>
               </sample>
-->
<html>
<head>
	<title>Icons size in accordion</title>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<link rel="stylesheet" type="text/css" href="../../../codebase/dhtmlx.css"/>
	<script src="../../../codebase/dhtmlx.js"></script>
	<script>
		
		var myToolbar;
		var tbIconSize = null;
		var tbXML = "dhxtoolbar_button.xml";
		var myAcc;
		var myGrid;
		
		function doOnLoad() {
			
			myAcc = new dhtmlXAccordion({
				parent: "accObj",
				icon_path: "../../dhtmlxAccordion/common/icons/",
				multi_mode: true,
				items: [{id: "a1", text: "Hi", img: "flag_red.png", height: 200},
					{id: "a2", text: "How", open: false, img: "flag_green.png"},
					{id: "a3", text: "are you?", open: false, img: "flag_blue.png"}]
			});
			
			//
			myGrid = myAcc.cells("a1").attachGrid();
			myGrid.setImagePath("../../../codebase/imgs/");
			myGrid.loadXML("../common/grid.xml?etc="+new Date().getTime());
			
			myToolbar = myAcc.cells("a1").attachToolbar();
			loadToolbar(tbIconSize||18, true);
		}
		
		function loadToolbar(size, force) {
			if (tbIconSize == size && force !== true) return;
			myToolbar.clearAll();
			myToolbar.setIconSize(size);
			myToolbar.setIconsPath("../common/icon_size/dhx_skyblue/"+size+"/");
			myToolbar.loadStruct("../common/"+tbXML);
			tbIconSize = size;
		}
		function setXML(xml) {
			if (tbXML == xml) return;
			tbXML = xml;
			myToolbar.clearAll();
			myToolbar.loadStruct("../common/"+tbXML);
		}
	</script>
</head>
<body onload="doOnLoad();">
	<div style="padding-bottom: 10px;">
		<input type="button" value="18" onclick="loadToolbar(18);">
		<input type="button" value="24" onclick="loadToolbar(24);">
		<input type="button" value="32" onclick="loadToolbar(32);">
		<input type="button" value="48" onclick="loadToolbar(48);">
		&nbsp;&nbsp;&nbsp;
		<input type="button" value="with labels" onclick="setXML('dhxtoolbar_button.xml');">
		<input type="button" value="without labels" onclick="setXML('dhxtoolbar_button2.xml');">
	</div>
	<div id="accObj" style="position: relative; width: 360px; height: 600px;"></div>
</body>
</html>